<template>
	<view class="content">
		<view class="body">
			<view class="header">
				<view class="row">
					<view class="line">
						<u-tag text="报国寺全山往返线" @click="selectRoute"></u-tag>
					</view>
					<view class="row-tip">
						<view class="cell">
							<text class="cell-title">司机：</text>
							<text class="cell-content">张三</text>
							<text class="cell-content">13656894512</text>
						</view>
						<view class="cell">
							<view class="cell-row-left">
								<text class="cell-title">编号：</text>
								<text class="cell-content">12</text>
							</view>
							<view class="cell-row-right">
								<text class="cell-title">车牌：</text>
								<text class="cell-content">粤B12345</text>
							</view>
						</view>
					</view>
				</view>
			</view>
			<view class="step">
				<u-steps :current="lineRoute.length" direction="column" dot>
					<u-steps-item v-for="(item, index) in lineRoute" :key="index">
						<view class="slot-icon slot-right" slot="icon">{{ index }}</view>
						<view class="slot-content" slot="desc">
							<u-tag :text="item" @click="selectRoute"></u-tag>
							<view class="sub-row">
								<view class="row-name">
									<text>签到时间:</text>
								</view>
								<text class="row-cell">2023-6-19 12:25:23</text>
							</view>
							<view class="sub-row">
								<view class="row-name">
									<text>电子路单签字:</text>
								</view>
								<text class="row-cell">2023-6-19 12:25:23</text>
							</view>
							<view class="sub-row">
								<view class="row-name">
									<text>出站安检签字:</text>
								</view>
								<text class="row-cell">2023-6-19 12:25:23</text>
							</view>
						</view>
					</u-steps-item>
				</u-steps>
			</view>
		</view>
	</view>
</template>

<script>
export default {
	onLoad() {
		// #ifdef MP
		//未登录转登录页面，已登录转主页面
		if (!this.$store.dispatch('checkIndentity')) return;
		// #endif
	},
	data() {
		return {
			lineRoute: ['报国寺车站', '雷洞坪车站', '零公里', '万年寺车站', '五显岗车站', '黄湾车站', '报国寺车站']
		};
	}
};
</script>

<style lang="scss" scoped>
.content {
	height: 100%;
	width: 100%;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	background-color: white;
	overflow: scroll;
	.body {
		width: 100%;
		height: 100%;
		padding-top: 244rpx;
		.header {
			border: solid 1rpx #1a90e4;
			width: 100%;
			height: auto;
			position: fixed;
			top: var(--window-top, 0);
			z-index: 99;
			box-shadow: 0px 1px 5px #d9d9d9;
			background-color: white;
			.row {
				margin: 20rpx;
				align-items: center;
				border: solid 1rpx #3c9cff;
				border-radius: 10rpx;
				background-color: #f1f2f4;
				.line {
					width: 100%;
					position: relative;
				}
				.row-tip {
					margin: 10rpx 20rpx;
					display: flex;
					flex-direction: column;
					.tip-m {
						color: #3c9cff;
					}
					.cell {
						padding: 10rpx 0;
						display: flex;
						.cell-title {
							letter-spacing: 10rpx;
							font-size: 28rpx;
						}
						.cell-content {
							letter-spacing: 10rpx;
							font-size: 28rpx;
							color: #1a90e4;
							margin: 0 20rpx;
						}
						.cell-content2 {
							font-size: 28rpx;
							color: #1a90e4;
							margin: 0 20rpx;
						}
						.cell-row-left {
							width: 40%;
						}
						.cell-row-right {
							flex: 1;
						}
						.cell-row {
							width: 50%;
						}
					}
				}
			}
		}
		.step {
			display: flex;
			margin: 20rpx 20rpx;
			.slot-content {
				height: auto;
				margin: 20rpx 10rpx;
				border-radius: 10rpx;
				border: solid 1rpx #3c9cff;
				border-top: none;
				.sub-row {
					display: flex;
					align-items: center;
					margin: 20rpx 20rpx;
					.row {
						width: 50%;
					}
					.row-name {
						width: 220rpx;
						border: solid 1rpx #3c9cff;
						color: #3c9cff;
						font-size: 26rpx;
						padding: 5rpx 20rpx;
						border-radius: 10rpx;
						text-align-last: justify;
					}
					.row-cell {
						color: #1a90e4;
						margin: 0 20rpx;
					}
				}
			}
			.slot-icon {
				width: 36rpx;
				height: 36rpx;
				border-radius: 50%;
				font-size: 32rpx;
				color: white;
				display: flex;
				justify-content: center;
				align-items: center;
			}
			.slot-left {
				background-color: #969799;
			}
			.slot-right {
				background-color: #00ff7f;
			}
			.slot-mid {
				background-color: #ff0000;
			}
		}
	}
}
::v-deep .u-steps.u-steps--column {
	width: 100%;
}
</style>
